from lina.mongodb import db
from bson import ObjectId

from lina.service.BaseService import BaseService


class TagService(BaseService):

    def __init__(self):
        self.table_name = 'tag'
        super().__init__()

    def fetch_all(self):
        table = db()[self.table_name]

        obj_list = []
        for item in table.find():
            obj_list.append(item)

        return obj_list

    
